package com.stm.bi.api;

import com.stm.framework.dto.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;
import com.stm.bi.dto.query.SubjectCategoryListQry;
import com.stm.bi.dto.query.SubjectCategoryTreeQry;
import com.stm.bi.api.fallback.SubjectCategoryFallbackFactory;
import com.stm.bi.dto.vo.SubjectCategoryVO;
import com.stm.bi.dto.vo.SubjectCategoryTreeVO;

import java.util.List;

/**
 * 科目分类RPC服务
 * @author qinyongjie
 * @date 2025-05-22
 */
@FeignClient(contextId = "subjectCategoryRemoteService", value = "saas-bi",fallbackFactory = SubjectCategoryFallbackFactory.class)
public interface SubjectCategoryRemoteService {

    /**
    * 科目分类详细查询
    */
    @GetMapping(value = "/rpc/subjectCategory/{id}")
    public Response<SubjectCategoryVO> selectById(@PathVariable("id") Long id);

    /**
     * 科目分类树查询
     */
    @GetMapping(value = "/rpc/subjectCategory/tree")
    public Response<List<SubjectCategoryTreeVO>> selectTree(@SpringQueryMap SubjectCategoryTreeQry qry);

}
